home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / fido / XPACK275.lha / rexx / SendFile.rexx < prev    next >
OS/2 REXX Batch file  |  1995-04-06  |  1KB  |  43 lines

  1. /**/
  2. v='$VER: SendFile Rexx Crash File Queuer Williamson 55.05'
  3. options results
  4. options failat 20
  5. parse upper arg site jf as
  6. if site="" | jf="" then do
  7.   say 'Usage: SendFile 5daddress fullpathfilename [sendas] [disposition]'
  8.   say 'Priority is always 50'
  9.   say 'Disposition defaults to Leave'
  10.   exit
  11. end
  12. if ~show("L", "xferq.library") then;if ~addlib("xferq.library",0,-30,0) then do;Say "Couldn't access xferq.library!";exit 20;end
  13. if ~(exists(jf)) then do;Say 'Cannot find ['jf']';return 1;end
  14. as=strip(as)
  15. if as="" then do
  16.   as=get_fn(jf)
  17.   dsp=0
  18. end;else do
  19.   if length(as)=1 then do
  20.     adsp=upper(as)
  21.     as=get_fn(jf)
  22.   end;else do
  23.     if words(as)=1 then adsp="L"
  24.     else do
  25.       adsp=upper(word(as,2))
  26.       as=word(as,1)
  27.     end
  28.   end
  29.   if upper(adsp)='D' then dsp=1
  30.   else dsp=0
  31. end
  32. if XfqAddWorkQuick(site,jf,as,50,dsp) then Say 'Queued 'jf' as 'as' for 'site
  33. else Say "File "jf" is already queued for "site
  34. say "Result:"XFQERRORCODE":"XFQERRORMSG
  35. drop XFQERRORCODE XFQERRORMSG
  36. call XfqClose()
  37. exit
  38.  
  39. get_fn:
  40. if lastpos('/',arg(1))~=0 then return substr(arg(1),lastpos('/',arg(1))+1)
  41. else if lastpos(':',arg(1))~=0 then return substr(arg(1),lastpos(':',arg(1))+1)
  42. else return arg(1)
  43.